{extend name=".././view/create.html" /}
{block name="form"}
<form class="layui-form layui-form-pane" lay-filter="myform">
	<div class="layui-form-item">
		<label for="title" class="layui-form-label">
			<span class="x-red">*</span>名称
		</label>
		<div class="layui-input-block">
			<input type="text" id="title" name="title" lay-verify="required" autocomplete="off" class="layui-input " value="{$list.data.title|default=''}" placeholder="2-15个字符">
		</div>
	</div>
	<div class="layui-form-item">
		<label for="category_id" class="layui-form-label"><span class="x-red">*</span>教室功能</label>
		<div class="layui-input-block">
			<select name="category_id" id="category_id" lay-verify="required">
			</select>
		</div>
	</div>
	<div class="layui-form-item" pane>
		<label for="shangke" class="layui-form-label"><span class="x-red">*</span>是否可以上课</label>
		<div class="layui-input-block">
			<input type="radio" name="shangke" value="1" title="是" {present name="$list.data.shangke"} {eq name="$list.data.shangke" value="是" } checked {/eq} {/present}> <input type="radio" name="shangke" value="0" title="否" {present name="$list.data.shangke" } {eq name="list.data.shangke" value="否" } checked {/eq} {/present} {notpresent name="$list.data.shangke" } checked {/notpresent}>
		</div>
	</div>
	<div class="layui-form-item">
		<label for="weizhi" class="layui-form-label">
			位置
		</label>
		<div class="layui-input-block">
			<input type="text" id="weizhi" name="weizhi" autocomplete="off" class="layui-input" value="{$list.data.weizhi|default=''}" placeholder="2-100个字符">
		</div>
	</div>
	<div class="layui-form-item">
		<label for="beizhu" class="layui-form-label">
			备注
		</label>
		<div class="layui-input-block">
			<input type="text" id="beizhu" name="beizhu" autocomplete="off" class="layui-input" value="{$list.data.beizhu|default=''}" placeholder="2-100个字符">
		</div>
	</div>
	<div class="layui-form-item" style="text-align: right;">
		<button class="layui-btn" lay-filter="mysubmit" lay-submit="">
			{$list.set.butname}
		</button>
	</div>
</form>
{/block}
{block name="myjs"}
<script>
layui.use(['laydate', 'createInput'], function() {
	var laydate = layui.laydate,
		cInput = layui.createInput;
	cInput.categorySelect('category_id', 126, "{$list.data.category_id|default=''}");
});

</script>
{/block}
